package szytask1;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;

public class Task2 {
    public static void main(String[] args) throws IOException{
        BufferedReader br=new BufferedReader(new FileReader("pan.txt"));
        HashMap<String,String> hashMap=new HashMap<String, String>();
        String line=null;
        while ((line=br.readLine())!=null){
            String[] key= line.split(",");
            hashMap.put(key[0],key[1]);
        }
        br.close();
        Iterator iterator=hashMap.keySet().iterator();
        while (iterator.hasNext()){
            String key= (String) iterator.next();
            String value=hashMap.get(key);
            System.out.println(key+":"+value);
        }
    }
}
